package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WorkEmployPositionMapper;
import com.ruoyi.system.domain.WorkEmployPosition;
import com.ruoyi.system.service.IWorkEmployPositionService;

/**
 * 招聘计划Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class WorkEmployPositionServiceImpl implements IWorkEmployPositionService 
{
    @Autowired
    private WorkEmployPositionMapper workEmployPositionMapper;

    /**
     * 查询招聘计划
     * 
     * @param positionId 招聘计划主键
     * @return 招聘计划
     */
    @Override
    public WorkEmployPosition selectWorkEmployPositionByPositionId(Long positionId)
    {
        return workEmployPositionMapper.selectWorkEmployPositionByPositionId(positionId);
    }

    /**
     * 查询招聘计划列表
     * 
     * @param workEmployPosition 招聘计划
     * @return 招聘计划
     */
    @Override
    public List<WorkEmployPosition> selectWorkEmployPositionList(WorkEmployPosition workEmployPosition)
    {
        return workEmployPositionMapper.selectWorkEmployPositionList(workEmployPosition);
    }

    /**
     * 新增招聘计划
     * 
     * @param workEmployPosition 招聘计划
     * @return 结果
     */
    @Override
    public int insertWorkEmployPosition(WorkEmployPosition workEmployPosition)
    {
        workEmployPosition.setCreateTime(DateUtils.getNowDate());
        return workEmployPositionMapper.insertWorkEmployPosition(workEmployPosition);
    }

    /**
     * 修改招聘计划
     * 
     * @param workEmployPosition 招聘计划
     * @return 结果
     */
    @Override
    public int updateWorkEmployPosition(WorkEmployPosition workEmployPosition)
    {
        workEmployPosition.setUpdateTime(DateUtils.getNowDate());
        return workEmployPositionMapper.updateWorkEmployPosition(workEmployPosition);
    }

    /**
     * 批量删除招聘计划
     * 
     * @param positionIds 需要删除的招聘计划主键
     * @return 结果
     */
    @Override
    public int deleteWorkEmployPositionByPositionIds(Long[] positionIds)
    {
        return workEmployPositionMapper.deleteWorkEmployPositionByPositionIds(positionIds);
    }

    /**
     * 删除招聘计划信息
     * 
     * @param positionId 招聘计划主键
     * @return 结果
     */
    @Override
    public int deleteWorkEmployPositionByPositionId(Long positionId)
    {
        return workEmployPositionMapper.deleteWorkEmployPositionByPositionId(positionId);
    }
}
